In computer programming, decision tree models are used to evaluate feature vectors. A feature vector can be a multi-dimensional vector of features, e.g., numerical features, each of which represents an aspect of an object, e.g., an age of a user of a social networking application. A decision tree is a flowchart-like structure that is modeled like a tree in which an internal node represents a “test” on an attribute, each branch represents the outcome of the test and each leaf node represents a value (e.g., decision taken after computing all attributes). Evaluating a feature vector using a decision tree can include traversing the nodes of the tree based on the features of the feature vector and arriving at a leaf node to obtain a value for the feature vector.
Typically, a feature vector is evaluated across a number of decision trees for obtaining more accurate results. In general, a large number of feature vectors are evaluated across multiple decision trees (e.g., “1000” feature vectors across “1000” trees). However, since a processor cache has limited storage space, not all the feature vectors and the decision trees can be loaded into the cache at once. The current techniques typically load the trees at once and evaluate the feature vectors one by one against all the trees. The problem with this approach is that if the decision trees are huge, e.g., includes a large number of nodes, the evaluation of the trees can be resource heavy, e.g., consumes processing and storage capacity.
Further, the current techniques represent the decision trees in computer programming languages as tree data structures, e.g., using linked lists, the processing of which can consume significant amount of computing resource. Furthermore, the current techniques do not optimize the decision trees to be optimized based on the feature vectors to be evaluated.